package com.hwua.service.Impl;

import com.hwua.dao.ICommentDao;
import com.hwua.dao.Impl.CommentDaoImpl;
import com.hwua.entity.Comment;
import com.hwua.service.ICommentService;

import java.sql.SQLException;
import java.util.List;

public class CommentServiceImpl implements ICommentService {
    private ICommentDao commentDao=new CommentDaoImpl();
    @Override
    public List<Comment> queryForLimit(Integer start,Integer pageSize) throws Exception {
        return commentDao.queryForLimit(start, pageSize);
    }

    @Override
    public Long queryCount() throws Exception {
        return commentDao.queryCount();
    }

    @Override
    public boolean insertComm(Comment comment) throws Exception {
        return commentDao.insertComment(comment)==1?true:false;
    }

    @Override
    public List<Comment> queryA() throws Exception {
        return commentDao.queryAll();
    }
}
